package com.asiainfo.kbisheet.model
{
	import flash.events.Event;
	import flash.events.EventDispatcher;

	/**
	 * 消息模型
	 */
	[Bindable]
	[Event(name="change", type="mx.events.Event")]
	public class MessageModel extends EventDispatcher
	{
		private static var _instance:MessageModel;
		
		public static function getInstance():MessageModel{
			if(_instance == null){
				_instance = new MessageModel();
			}
			return _instance;
		}
		
		private var _message:String;
		
		public function set message(value:String):void{
			if(_message != value){
				_message = value;
				var newEvent:Event = new Event("change");
				dispatchEvent(newEvent);				
			}
		}
		
		public function get message():String{
			return _message;
		}
	}
}